package cn.edu.njupt.eclass.aixinling.mapper;

import cn.edu.njupt.eclass.aixinling.model.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface TagMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Tag record);

    Tag selectByPrimaryKey(Integer id);

    List<Tag> selectAll();

    int updateByPrimaryKey(Tag record);//编辑Tag

    Tag getHighestWeightTag();//获取最高权重的Tag

    List<Tag> getTagsByNum(Integer num);//获取按照权重排序的指定数目的tags

    int setTagUnpublishedById(Integer id);//设置

    int setTagPublishedById(Integer id);//发布

    int getStatusById(Integer id);//获取状态

    int setTagsTopById(Integer id);//置顶


}